package com.xidian.zhiancloud.service.accidentManage;

import com.xidian.zhiancloud.dao.MissAccidentStatisticMapper;
import com.xidian.zhiancloud.vo.accidentmessage.MissAccidentStatisticVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName MissAccidentStatisticService
 * @Description TODO
 * @Author Halo
 **/
@Service
public class MissAccidentStatisticService {

    @Resource
    private MissAccidentStatisticMapper missAccidentStatisticMapper;

    /**
     * 根据事件发生的主要原因进行统计
     * @param companyId
     * @return
     */
    public List<MissAccidentStatisticVO> statisticByMainCuase(Long companyId){
        return missAccidentStatisticMapper.statisticByMainCuase(companyId);
    }

    /**
     * 根据责任部门进行统计
     * @param companyId
     * @return
     */
    public List<MissAccidentStatisticVO> statisticByDepartment(Long companyId){
        return missAccidentStatisticMapper.statisticByDepartment(companyId);
    }
}
